package com.ruoyi.coupons.mapper;

import java.util.ArrayList;
import java.util.List;
import com.ruoyi.coupons.domain.CouponsMember;
import com.ruoyi.shopping.domain.CouponsVo;
import org.apache.ibatis.annotations.Param;

/**
 * 优惠券领取Mapper接口
 *
 * @author ruoyi
 * @date 2021-11-26
 */
public interface CouponsMemberMapper
{
    /**
     * 查询优惠券领取
     *
     * @param id 优惠券领取主键
     * @return 优惠券领取
     */
    public CouponsMember selectCouponsMemberById(Long id);

    /**
     * 查询优惠券领取列表
     *
     * @param couponsMember 优惠券领取
     * @return 优惠券领取集合
     */
    public List<CouponsMember> selectCouponsMemberList(CouponsMember couponsMember);

    /**
     * 新增优惠券领取
     *
     * @param couponsMember 优惠券领取
     * @return 结果
     */
    public int insertCouponsMember(CouponsMember couponsMember);

    /**
     * 修改优惠券领取
     *
     * @param couponsMember 优惠券领取
     * @return 结果
     */
    public int updateCouponsMember(CouponsMember couponsMember);

    /**
     * 删除优惠券领取
     *
     * @param id 优惠券领取主键
     * @return 结果
     */
    public int deleteCouponsMemberById(Long id);

    /**
     * 批量删除优惠券领取
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCouponsMemberByIds(Long[] ids);

    /**
     * 批量逻辑删除优惠券领取
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int logicDeleteCouponsMember(@Param("array")Long[] ids,@Param("delType")String delType,@Param("delUser")Long delUser);

    List<CouponsMember> selectCoupons(Long memberId, String useState,String newUserState);

    void setOldUser(ArrayList<Long> couponsIds);

    List<CouponsMember> selectNeedOverdue();

    List<CouponsVo> selectMineList(CouponsVo vo);
}
